package dproxy.server.common.exceptions;

/**
 * Thrown when an error occurs when reading a request,
 * or when the remote server returns an "Error Response".
 */
public class ResponseReadException extends AppException {

	/** SVUID */
	private static final long serialVersionUID = 1L;
	
    /** Error returned from remote application. */
    private byte[] errorContents;
    
    /** Details about error response. */
    private String errorDetails;
    
    /**
     * @param errorContents Error returned from remote application
     * @param errorDetails Details about error response
     */
    public ResponseReadException(byte[] errorContents, String errorDetails) {
        this.errorContents = errorContents;
        this.errorDetails = errorDetails;
    }

    /**
     * @return Returns the errorContents.
     */
    public byte[] getErrorContents() {
        return errorContents;
    }
    /**
     * @return Returns the errorDetails.
     */
    public String getErrorDetails() {
        return errorDetails;
    }

}
